<template>
  <section>
    <el-row style="margin: -3px 0px 0px 1px">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/system/dashboard' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>其他</el-breadcrumb-item>
        <el-breadcrumb-item>图片管理</el-breadcrumb-item>
      </el-breadcrumb>
    </el-row>
    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
      <el-form :inline="true" style="float:left;margin: 18px 27px -40px">
        <el-button type="primary" @click="AddImage">添加图片</el-button>
      </el-form>
    </el-col>
    <add-image ref="AddImage" @reload="loadImageList"/>

    <el-card>
      <div class="demo-image">
        <div class="block" v-for="fit in fits" :key="fit">
          <span class="demonstration">{{ fit }}</span>
          <el-image
            style="width: 100px; height: 100px"
            :src="url"
            :fit="fit"/>
        </div>
      </div>
    </el-card>
  </section>
</template>

<script>
import AddImage from "./component/AddImage";

export default {
  name: "ImageManager",
  components: {AddImage},
  data() {
    return {
      fits:'fill',
      url:'',
    }
  },
  methods: {
    loadImageList() {
      this.$axios.get("/image/ImageList").then(resp=>{
        if(resp.status===200&&resp){

        }
      })
    },
    AddImage() {
      this.$refs.AddImage.dialogFormVisible=true
    }
  },
  mounted() {
    this.loadImageList()
  }
}
</script>

<style scoped>

</style>
